﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HotelResSystem2
{
    public class Bill
    {
        #region Properties

        /// <summary>
        /// Reservation containing information needed for bill
        /// </summary>
        public Reservation Reservation { get; set; }

        /// <summary>
        /// Any additional fees charged to the room.
        /// </summary>
        public double AdditionalCharges { get; set; }

        /// <summary>
        /// Calculated subtotal of the bill
        /// </summary>
        public double Subtotal
        {
            get
            {
                return PaymentSystem.GetInstance().CalculateSubtotal(Reservation.NumberOfDays, Reservation.NightlyRate, Reservation.Discount);
            }
        }

        /// <summary>
        /// Calculated grand total of the bill.
        /// </summary>
        public double GrandTotal
        {
            get
            {
                return PaymentSystem.GetInstance().CalculateGrandTotal(Subtotal, AdditionalCharges);
            }
        }

        #endregion // Properties
    }
}
